<div class="super-authority">
    <div class="top">
        <div class="fl">超级权限人员</div>
        <div class="fr">
            <button nz-button nzType="link" [ngStyle]="{'background': totalchecked?'#FF4C52':'#C0C4CC'}"
                style="color: #fff;" (click)="delSuperPerson()" [disabled]="!totalchecked">删除</button>
            <button nz-button nzType="primary" (click)="showAdd()">添加人员</button>

        </div>
    </div>
    <div class="table-body">
        <nz-table #rowSelectionTable nzShowSizeChanger [nzData]="listOfData"
            (nzCurrentPageDataChange)="onCurrentPageDataChange($event)" [nzShowPagination]="false">
            <thead>
                <tr>
                    <th [(nzChecked)]="checkedAll" [nzIndeterminate]="indeterminate"
                        (nzCheckedChange)="onAllChecked($event)" nzWidth="22%" nzAlign="left"
                        style="background-color: white;"></th>
                    <th nzWidth="26%" style="background-color: white;">姓名</th>
                    <th nzWidth="26%" style="background-color: white;">所在部门</th>
                    <th nzWidth="26%" style="background-color: white; padding-left: 30px;"> 操作</th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let data of rowSelectionTable.data">
                    <td nzAlign="left" [nzChecked]="setOfCheckedId.has(data.id)"
                        (nzCheckedChange)="onItemChecked(data.id, $event)"></td>
                    <td>{{ data.name }}</td>
                    <td>{{ data.departmentNode.nodeName }}</td>
                    <td> <a nz-button nzType="link" (click)="showEdit(data.acc)">编辑</a></td>
                </tr>
            </tbody>
        </nz-table>
        <div class="total">
            共 <span style="color: blue">{{listOfData?listOfData.length:0}}</span> 条
        </div>
    </div>
</div>
<nz-modal [(nzVisible)]="isVisibleAdd" nzTitle="添加人员" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOkAdd()">
    <form nz-form [formGroup]="validateForm" [nzNoColon]="true">
        <nz-form-item>
            <nz-form-label [nzSpan]="5">选择部门</nz-form-label>
            <nz-form-control [nzSpan]="19" nzErrorTip="请选择部门">
                <nz-select nzPlaceHolder="请选择" formControlName="department" [nzSuffixIcon]="suffixTpl">
                    <nz-option [nzLabel]="item.nodeName" [nzValue]="item.id" *ngFor="let item of departlist">
                    </nz-option>
                </nz-select>

            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSpan]="5">选择人员</nz-form-label>
            <nz-form-control [nzSpan]="19" nzErrorTip="请选择人员">
                <nz-select nzPlaceHolder="请选择" formControlName="person" [nzSuffixIcon]="suffixTpl">
                    <nz-option [nzLabel]="item.name" [nzValue]="item.id" *ngFor="let item of departPersonlist">
                    </nz-option>
                </nz-select>

            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSpan]="5">选择权限</nz-form-label>
            <nz-form-control [nzSpan]="19" nzErrorTip="请选择权限">
                <nz-select nzMode="tags" nzPlaceHolder="请选择" formControlName="jurisdiction" [nzSuffixIcon]="suffixTpl">
                    <nz-option nzLabel="历史数据修改" nzValue="history"></nz-option>
                    <nz-option nzLabel="所有数据查看" nzValue="all"></nz-option>
                </nz-select>
            </nz-form-control>
        </nz-form-item>
    </form>
    <ng-template #suffixTpl>
        <i class="iconfont icon-arrow-down-s-fill"></i>
    </ng-template>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleEdit" nzTitle="超级权限" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOkEdit()"
    nzClassName="super">
    <div class="super-data">
        <label nz-checkbox [(ngModel)]="checkedsuperhistory">历史数据修改</label>
    </div>
    <div class="super-data">
        <label nz-checkbox [(ngModel)]="checkedsuperall">所有数据查看</label>

    </div>
</nz-modal>